package com.zit.java.controller;

import com.zit.java.pojo.Account;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;


public class BaseController {

    public final String SESSIONOBJ = "SESSIONACC";

    /**
     * 所有controller的父类
     */
    public Account getLoginAcc(HttpServletRequest servletRequest) {
        HttpSession session = servletRequest.getSession();
        Account acc = (Account) session.getAttribute(SESSIONOBJ);
        return acc;
    }
}
